import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import '../../viewmodel/MainPageViewModel.dart';

class MePage extends StatefulWidget {
  const MePage({super.key});

  @override
  State<MePage> createState() => _MePageState();
}

class _MePageState extends State<MePage> {
  final _mainPageViewModel = MainPageViewModel();

  void _gg() {
    // var firstLevelCategory = FirstLevelCategory(name: "xcxcx");
    // DatabaseHelper().insert(FirstLevelCategory(name: "xcxcx"));
    //
    setState(() {});
  }

  @override
  void initState() {
    super.initState();
    // name();
  }

  Future<void> name() async {
    await _mainPageViewModel.getALLOneCategory();
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: InkWell(
          child: const Text("添加数据"),
          onTap: () {},
        ),
      ),
    );
  }
}
